// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import http from '../src/api/http'
// import axios from 'axios'
import VueAxios from 'vue-axios'
// Vue.prototype.$axios = axios
Vue.use(VueAxios, http)
// Vue.use(VueAxios, axios)

//导入vuex
import store from './store/index'


import 'vant/lib/index.css';
import 'animate.css'

Vue.config.productionTip = false

import 'vant/lib/index.css';
import { Button, Tabbar,Popup, TabbarItem, Icon, Col, Row, Search, Tab, Tabs, Swipe, SwipeItem ,Divider} from 'vant';
import { Form,Field,Checkbox,CheckboxGroup,Uploader,Calendar,Cell,CellGroup,Notify,Image as VanImage,NavBar,Toast,NoticeBar,ActionSheet,Tag,Dialog} from 'vant';
Vue.use(Button);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Icon);
Vue.use(Col);
Vue.use(Row);
Vue.use(Search);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Divider);
Vue.use(ActionSheet);
Vue.use(Tag);
Vue.use(Popup)
//注册focus
Vue.directive('focus', {
  inserted: function (el) {
    el.focus()
  }
})
Vue.use(Form);
Vue.use(Field);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Uploader);
Vue.use(Calendar);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Notify);
Vue.use(VanImage);
Vue.use(NavBar);
Vue.use(Toast);
/* eslint-disable no-new */
Vue.use(NoticeBar);
Vue.use(Dialog);
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
